package com.lsa.skienna.challenge.chap11.the111101_IsBiggerSmarter;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintStream;

import junit.framework.TestCase;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.output.ByteArrayOutputStream;

public class TestIsBiggerSmarter extends TestCase {
    public void testIsBiggerSmarter() throws IOException {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        Main.process(new FileInputStream("data/pc11/the111101_IsBiggerSmarter/111101.inp"), new PrintStream(out));
        String expected = FileUtils.readFileToString(new File("data/pc11/the111101_IsBiggerSmarter/111101.oup"));
        assertEquals(expected, out.toString());
    }
}
